package com.icarus.entity;

import javax.swing.*;
import java.util.List;

/**
 * 抽象类 - 飞机
 */
public abstract class Plane {


    //飞机的当前屏幕的坐标
    private int x;
    private int y;
    //飞机的速度
    private int speed;
    //飞机子弹
    private List<Bullet> bullets;
    //飞机图标
    private ImageIcon icon;

    //当前飞机是否活着
    private boolean alive;

    //设置生命值
    private int Hp;


    //飞机的方向  0向上 1 向下 2向左 3向右
    private int direction;

    public void setDirection(int direction) {
        this.direction = direction;
    }


    public int getDirection() {
        return direction;
    }

    public void setHp(int hp) {
        Hp = hp;
    }

    public int getHp() {
        return Hp;
    }

    public boolean isAlive() {
        return alive;
    }

    public void setAlive(boolean alive) {
        this.alive = alive;
    }

    public ImageIcon getIcon() {
        return icon;
    }

    public void setIcon(ImageIcon icon) {
        this.icon = icon;
    }

    public List<Bullet> getBullets() {
        return bullets;
    }

    public void setBullets(List<Bullet> bullets) {
        this.bullets = bullets;
    }

    public int getX() {
        return x;
    }

    public void setX(int x) {
        this.x = x;
    }

    public int getY() {
        return y;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getSpeed() {
        return speed;
    }

    public void setSpeed(int speed) {
        this.speed = speed;
    }

    //向上移动
    public abstract void moveUp();

    //向下移动
    public abstract void moveDown();

    //向左移动
    public abstract void moveLeft();

    //向右移动
    public abstract void moveRight();

    //攻击
    public abstract void attack();

}
